﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Text;

namespace paper.evisa99.com.Controllers.Class
{
    public class Utility
    {

        ///====================================================================
        public string GetTopic(string CountryCode)
        {
            string Topic = "签证申请表格";
            switch (CountryCode)
            {
                case "CA": Topic = "加拿大" + Topic; break;
                case "US": Topic = "美国" + Topic; break;
                case "AU": Topic = "澳大利亚" + Topic; break;
                case "FR": Topic = "法国" + Topic; break;
                case "GB": Topic = "英国" + Topic; break;
                case "DE": Topic = "德国" + Topic; break;
                case "CH": Topic = "瑞士" + Topic; break;
                case "NL": Topic = "荷兰" + Topic; break;
                case "NZ": Topic = "新西兰" + Topic; break;
                case "JP": Topic = "日本" + Topic; break;

                case "TH": Topic = "泰国" + Topic; break;
                case "SG": Topic = "新加坡" + Topic; break;

                case "MY": Topic = "马来西亚" + Topic; break;
                case "KR": Topic = "韩国" + Topic; break;
                case "IT": Topic = "意大利" + Topic; break;
                case "DK": Topic = "丹麦" + Topic; break;
                case "ES": Topic = "西班牙" + Topic; break;
                case "PT": Topic = "葡萄牙" + Topic; break;
                case "SE": Topic = "瑞典" + Topic; break;
                case "BE": Topic = "比利时" + Topic; break;
                case "FI": Topic = "芬兰" + Topic; break;
                case "NO": Topic = "挪威" + Topic; break;
                case "AT": Topic = "奥地利" + Topic; break;
                case "ZA": Topic = "南非" + Topic; break;
                case "RU": Topic = "俄罗斯" + Topic; break;
            }
            return Topic;
        }
        //--------------------------------------------------------------------------------------------
        public string GetSubject(string InfoChannel)
        {
            string Subject = "表格";
            switch (InfoChannel)
            {
                case "PS": Subject = "个人信息"; break;
                case "EX": Subject = "工作及教育信息"; break;
                case "FM": Subject = "家庭信息"; break;
                case "PP": Subject = "护照及签证信息"; break;
                case "IT": Subject = "行程信息"; break;
                case "FIN": Subject = "完成填写"; break;
            }
            return Subject;
        }
        //--------------------------------------------------------------------------------------------
        public string GetNaviLinks(string CountryCode, string InfoChannel, string MemberID)
        {
            StringBuilder box = new StringBuilder();
            box.AppendLine("<li><a href=\"/" + CountryCode + "/Form/PS/" + MemberID + "/?key=" + Authority.GenKey(MemberID + "PS") + "\">" + GetSubject("PS") + "</a></li>");
            box.AppendLine("<li>&gt;</li>");
            box.AppendLine("<li><a href=\"/" + CountryCode + "/Form/EX/" + MemberID + "/?key=" + Authority.GenKey(MemberID + "EX") + "\">" + GetSubject("EX") + "</a></li>");
            box.AppendLine("<li>&gt;</li>");
            box.AppendLine("<li><a href=\"/" + CountryCode + "/Form/FM/" + MemberID + "/?key=" + Authority.GenKey(MemberID + "FM") + "\">" + GetSubject("FM") + "</a></li>");
            box.AppendLine("<li>&gt;</li>");
            box.AppendLine("<li><a href=\"/" + CountryCode + "/Form/PP/" + MemberID + "/?key=" + Authority.GenKey(MemberID + "PP") + "\">" + GetSubject("PP") + "</a></li>");
            box.AppendLine("<li>&gt;</li>");
            box.AppendLine("<li><a href=\"/" + CountryCode + "/Form/IT/" + MemberID + "/?key=" + Authority.GenKey(MemberID + "IT") + "\">" + GetSubject("IT") + "</a></li>");
            box.AppendLine("<li>&gt;</li>");
            box.AppendLine("<li><a href=\"#\">" + GetSubject("FIN") + "</a></li>");
            return box.ToString();
        }
        //--------------------------------------------------------------------------------------------

        ///====================================================================

        //--------------------------------------------------------------------------------------------

    }
}